Method and apparatus of image processing to detect and enhance edges

ABSTRACT

A method for detecting and enhancing edges in an ultrasound image includes the steps of applying an edge detection filter to at least one of a plurality of pixels of an ultrasound image to compute an edge detection value having a magnitude and a direction; and applying either a directional edge enhancement filter or a non-directional smoothing filter to at least one of the plurality of pixels of the ultrasound image.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of U.S. Provisional Application Ser.No. 60/586,589, filed Jul. 9, 2004.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to a method, and apparatus for performingsuch method, of image processing to detect and enhance edges and toreduce noise in ultrasound imaging. Specifically, the method relates tothe detection of edges in noisy images and the enhancement the edges andthe image.

2. Description of Related Art

An ultrasound image consists of back-scattered signals from manyscatterers in the sample volume (or image cell) Interference effects ofthese many signals may enhance signals or cancel each other, creatinggrainy images. These grains are called speckles and thus the ultrasoundimage is represented by these grains or speckles even if the imaged areais considered to be homogeneous tissue with monotone contrast. In suchinstances, the ultrasound image looks noisy as the true tissue is hiddenbehind this curtain of grain noises absent image processing to removethe noise. Generally, a smoothing filter is applied to the ultrasoundimage to reduce speckles by smoothing out grains or noises. In themiddle of an organ, such as a liver, liver tissue may be consideredhomogenous and thus should have monotone contrast and speckles in thisarea should be smoothed. If the same smoothing filter is applied to theliver borders or all areas in the image, the liver borders or edgesbecome blurred or fuzzy.

What is therefore needed is a method for determining if a pixel in animage represents a homogeneous tissue area to which a smoothingalgorithm should be applied.

SUMMARY OF THE INVENTION

A method for detecting and enhancing edges in an ultrasound imagecomprises the steps of applying an edge detection filter to at least oneof a plurality of pixels of an ultrasound image to compute an edgedetection value comprising a magnitude and a direction; and applyingeither a directional edge enhancement filter or a non-directionalsmoothing filter to at least one of the plurality of pixels of theultrasound image.

A method for detecting and enhancing edges in an ultrasound imagecomprises the steps of applying a two-dimensional edge detection filterto at least one of a plurality of pixels of an ultrasound image tocompute an edge detection value comprising a magnitude and a direction;applying a directional edge enhancement filter to an edge of at leastone of the plurality of pixels of the ultrasound image; and applying anon-directional smoothing filter to a homogeneous area of at least oneof the plurality of pixels of the ultrasound image.

An image processor for an ultrasound device comprises an edge detectionfilter; a filter select look-up table; and an image process filter,wherein the edge detection filter, filter select look-up table and imageprocess filter are in communication with each other.

An apparatus for detecting and enhancing edges and detecting andsmoothing homogeneous areas in an ultrasound image comprises a set ofinstructions to detect and enhance one or more edges and to detect andsmooth one or more homogeneous areas in an ultrasound image.

An article of manufacturing comprises a computer usable medium having aset of instruction means embodied therein for detecting and enhancingone or more edges and for detecting and smoothing one or morehomogeneous areas in an ultrasound image, the computer usable mediumcomprises a set of instruction means for causing the set of instructionsto apply an edge detection filter across at least one of a plurality ofpixels of an ultrasound image to compute an edge detection valuecomprising a magnitude and a direction; and a set of instruction meansfor causing the set of instructions to apply either a directional edgeenhancement filter or a non-directional smoothing filter to at least oneof the plurality of pixels of the ultrasound image.

A system comprises a computer usable medium having a set of instructionsfor detecting and enhancing one or more edges and for detecting andsmoothing one or more homogeneous areas in an ultrasound image.

A program storage device readable by machine, tangibly embodying aprogram of instructions executable by the machine to perform methodsteps for detecting and enhancing one or more edges and for detectingand smoothing one or more homogeneous areas in an ultrasound imagecomprises applying an edge detection filter across at least one of aplurality of pixels of an ultrasound image to compute an edge detectionvalue comprising a magnitude and a direction; and applying either adirectional edge enhancement filter or a non-directional smoothingfilter to at least one of the plurality of pixels of the ultrasoundimage.

The details of one or more embodiments of the invention are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages of the invention will be apparent from thedescription and drawings, and from the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 a-c depicts edge detection filters of the prior art;

FIGS. 2 a-c depicts smoothing filters of the prior art;

FIG. 3 a depicts a 1×3 edge detection filter of the prior art;

FIG. 3 b depicts a 5×5 low pass filter of the prior art;

FIG. 3 c illustrates another edge detection filter of the prior art bycombining a −1 edge detection filter coefficient with the 5×5 low-passfilter of FIG. 3 b;

FIG. 3 d illustrates yet another edge detection filter of the prior artby combining a +1 edge detection filter coefficient with the 5×5low-pass filter of FIG. 3 b;

FIG. 3 e illustrates still another edge detection filter of the priorart by combining the edge detection filters of FIGS. 3 c and 3 d;

FIG. 4 depicts an edge detection filter of the present invention;

FIGS. 5 a-h depicts various exemplary embodiments of edge detectionfilters of various directions in accordance with the present invention;

FIGS. 6 a-b depict exemplary embodiments of edge detection filters ofhorizontal and vertical directions of the present invention;

FIGS. 7 a-b depict another exemplary embodiment of edge detectionfilters of both horizontal and vertical directions of the presentinvention;

FIGS. 8 a-b depict yet another exemplary embodiment of edge detectionfilters of both horizontal and vertical directions;

FIG. 9 a illustrates a flow chart for a method of detecting a verticaledge using a set of filter coefficients(−1, 0, 1) in accordance with thepresent invention;

FIG. 9 b illustrates a flow chart for a method of detecting a horizontaledge using a set of filter coefficients (−1, 0, 1) in accordance withthe present invention;

FIG. 10 a illustrates a flow chart for a method for detecting ahorizontal edge using a set of filter coefficients (−a, 0, a) inaccordance with the present invention;

FIG. 10 b illustrates a flow chart for detecting a vertical edge using aset of filter coefficients (−a, 0, a) in accordance with the presentinvention;

FIG. 11 is a diagram depicting the relationship between old and newfilter positions;

FIG. 12 illustrates the movement of an exemplary filter of the presentinvention across an ultrasound image;

FIG. 13 is a block diagram of an exemplary embodiment of a vertical edgedetection filter hardware of the present invention;

FIG. 14 is a diagram of an exemplary embodiment of an efficient verticaledge detection filter of the present invention;

FIG. 15 is a diagram of an exemplary embodiment of a horizontal edgedetection filter hardware of the present invention;

FIG. 16 is a diagram of an exemplary embodiment of an efficienthorizontal edge detection filter of the present invention;

FIG. 17 is a diagram of an exemplary embodiment of the horizontal edgedetection filter with filter coefficients of b_(i) of the presentinvention;

FIG. 18 is a diagram of an exemplary embodiment of the vertical edgedetection filter with filter coefficients of b_(i) of the presentinvention;

FIG. 19 a depicts a vertical edge detection filter of the presentinvention;

FIG. 19 b depicts a horizontal edge detection filter of the presentinvention;

FIG. 19 c depicts an exemplary embodiment of a +45-degree edge detectionfilter of the present invention;

FIG. 19 d depicts an exemplary embodiment of a −45-degree edge detectionfilter of the present;

FIG. 20 a depicts a strong horizontal edge enhancement filter of thepresent invention;

FIG. 20 b depicts a weak horizontal edge enhancement filter of thepresent invention;

FIG. 21 a depicts a strong vertical edge enhancement filter of thepresent invention;

FIG. 21 b depicts a weak vertical edge enhancement filter of the presentinvention;

FIG. 22 a depicts a strong +45-degree edge enhancement filter of thepresent invention;

FIG. 22 b depicts a weak 45-degree edge enhancement filter of thepresent invention;

FIG. 23 a depicts an exemplary embodiment of a strong −45-degree edgeenhancement filter of the present invention;

FIG. 23 b depicts an exemplary embodiment of a weak −45-degree edgeenhancement filter of the present invention;

FIG. 24 a depicts an exemplary embodiment of a strong smoothing filterof the present invention;

FIG. 24 b depicts an exemplary embodiment of a weak smoothing filter ofthe present invention;

FIG. 25 a depicts a logic diagram of an exemplary method of the presentinvention;

FIG. 25 b depicts a logic diagram of an exemplary method of edgeenhancement of the present invention;

FIG. 25 c depicts a logic diagram of an exemplary method of noisereduction of the present invention;

FIG. 26 depicts a diagram of an exemplary embodiment of an imageprocessor of the present invention; and

FIG. 27 depicts an exemplary embodiment of a filter select look-up-tableof the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT(S)

Accordingly, it is an object of the present invention to provide amethod, and apparatus for performing such method, of image processing todetect and enhance edges and to reduce noise in ultrasound imaging.Specifically, the method relates to the detection of edges in noisyimages and the enhancement the edges and the image.

It is therefore a teaching of the present invention to provide a methodfor determining if a smoothing filter should be applied to an ultrasoundimage depending on the output of an edge detection filter. The edgedetection filter determines if an image pixel belongs to an edge orbelongs in the middle of the homogeneous tissue area. The magnitude ofthe edge detection filter output is used to determine if the pixelbelongs to an edge or a ‘strong’ or ‘steep’ edge. If the pixel belongsto a homogeneous tissue area, a smoothing filter is applied to thepixel. The ultrasound image may comprise one or more, or a combinationof, any type of ultrasound images including but not limited to B-modetissue images, Doppler spectrum images, blood flow images, elasticityimages, and any form of grayscale or intensity images, and combinationscomprising at least one of the foregoing images, and the like, derivedfrom ultrasound signals that make up the image.

Edges of an object or organ have directions. Therefore, edge detectionneeds to be performed in directions. With reference to FIGS. 5 a-5 h,there are illustrated edge detection filters in 8 directions (−45°, 45°,67.5°, 22.5°, −67.5°, −22.5°, 0°, 90°, respectively) of the presentinvention. Each filter is implemented so as to produce the effect oflow-pass filtering as the size of each filter is large and is capable ofdetecting edges reliably with a better signal to noise ratio than thatof the prior art. Yet, unlike the edge detection filter after low-passfiltering of the prior art, the present invention applies the operationof differentiation to image pixels which are not overriding each other.To illustrate this problem of the preprocessing of a low-pass filter, a1×3 edge detection filter 31 of the horizontal direction, which is apart (or column) of the filter 11 in FIG. 1 a, is shown in FIG. 3 a.Using three columns of the filter 11 yields an effect of averaging and ahigher signal to noise ratio of detecting edges. However, forsimplicity, the edge detection filter 31 in FIG. 3 a is used toillustrate the overriding problem. FIG. 3 b shows a 5×5 low-pass filter33 which is applied to an image before the edge detection filter 31.FIG. 3 c shows the combination of the edge detection filter's 31 filtercoefficient value of −1 and the low-pass filter 33 filter coefficientvalues while FIG. 3 d shows the combination of the edge detectionfilter's 31 filter coefficient value of 1 and the low-pass filter 33filter coefficient values. The filter's 31 filter coefficient value of 0has no effects or no output. FIG. 3 e shows the overall effect of thecombination of edge detection filter 31 and the low-pass filter 33 onthe original image. The center three rows are overridden and the filtercoefficients cancel each other and become 0. The center three rows ofzero act like an edge detection filter of a spatial resolution ofapproximately 3 times worse than the original filter of a 1×3 filterhaving only one row of zeros. Therefore, the detected edge will befuzzy. To maintain the spatial resolution (sharpness) and registration(position) of the edge, the row of coefficients 0 should be as narrow aspossible. Three rows of zeros are two rows too many for coefficients of0. An improved edge detection filter 41 is shown for the same size array(7×5) in FIG. 4. This improved filter 41 is more accurate in detectingthe position of the edge than is that of FIG. 3 e and yet has bettersignal to noise ratio (SNR) in detecting the edge as it has a feature oflow-pass filtering in the upper and lower areas surrounding the row of0. Usually, an edge detection filter is applied to an image with theresult of the filter operation assigned to a pixel representing thecenter of the edge detection filter. Typically, when the edge detectionfilter is centered on an edge, the value of the center pixel is of alarge relative magnitude.

Referring now to FIGS. 5 a-5 h, eight edge detection filters of thepresent invention are shown. The number of filters or directions may beextended to twenty or more with the eight exemplary filters shown inFIGS. 5 a-5 h. Twenty filters can be designed with a step, or increment,of approximately nine degrees in direction. Edge detection filters 51-59have filter coefficient values at the intersection of each row andcolumn comprising an integer value, for example, 1, −1 or 0, to providefor quick calculation. Filter coefficient values of 1, −1 or 0 do notrequire multiplication but, rather, may be applied to an image usingonly addition and subtraction. However, filter coefficient values arenot necessarily restricted to integers but may also be decimal values orfloating-point numbers. Filter coefficients of all these filters 51-59are symmetrical, with the exception of the sign, that is, plus (+) orminus (−), either vertically, horizontally or in the direction of theedge that the filter is designed to detect. It should be noted that thecenter positions are all 0. For example, filter coefficients of thecenter row are all 0 for a horizontal edge detecting filter asillustrated in FIG. 5 g. Filter coefficients of the center column areall 0 for a vertical edge detecting filter as shown in FIG. 5 h. Notethat, with the exception of directions of 0°, 90°, 45°, and −45°, thezero coefficients of the edge detection filter 51 are located in the rowand column positions aligned with a detection direction 57.

Edge detection filters with many directions are ideal for detectingedges with great accuracy and sensitivity for the directions but aresomewhat limited for real-time implementation. Each filter requires manycalculations for a given image and the number of overall calculationsincreases with the number of filters. Therefore, an alternativeembodiment of the present invention uses only 2 filters, that is, one ofthe vertical direction and one of the horizontal direction. Edges ofother directions are detected using a filter size(2M+1)×(2N+1) as follows: $\begin{matrix}{R_{X} = {{\sum\limits_{\substack{i = 1 \\ j = 1}}^{\underset{j = N}{i = {{2\quad M} + 1}}}\quad z_{i,j}} + {\sum\limits_{\substack{i = 1 \\ j = {N + 2}}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}\quad z_{i,j}}}} & (1) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad( {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,j}}} )}} & (2)\end{matrix}$where M and N are integers and can be equal to each other. Z_(i,j) isthe image value to which the filter is applied at a point (i,j), and Rxand Ry are the filter outputs in the horizontal and vertical directions,respectively.The direction of the edge is determined by $\begin{matrix}{\vartheta = {\tan^{- 1}\frac{R_{Y}}{R_{X}}}} & (3)\end{matrix}$The magnitude or strength of the edge is determined bymagnitude=(R _(X) ² +R _(y) ²)^(0.5) ≈|R _(X) |+|R _(y)|  (4)

The magnitude of the combined horizontal (R_(x)) and vertical (R_(y))edge detection results is indicative of the presence of an edge.

The use of these 2 edge detection filters alone speed up the processingby a factor of 10 compared with the use of 20 filters as disclosed inthe prior art. Furthermore, the use of these 2 edge detection filtersmakes it possible to further speed up the processing by reducing thenumber of identical calculations performed at different filterpositions. For example, for a filter mask size of about 11×11, thisincrease in speed can be as much as 10 times as described in thefollowing sections. Therefore, combining this speed increase with thedecrease in the number of filters utilized, the overall increase in thespeed may be as much as 100 times faster. This makes real-timeimplementation of image processing possible.

One exemplary method of the present invention to speed up thecalculations required to apply one or more edge detection filters of thepresent invention involves iteration. A general form of the edgedetection filter can be expressed by $\begin{matrix}{R = {\sum\limits_{\substack{i = 1 \\ j = 1}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}\quad{w_{ij}z_{ij}}}} & (5)\end{matrix}$where i represents an x-coordinate and j represents a y-coordinate inthe filter mask; M, N are integers; R represents the filter output;w_(ij) represents the filter coefficients at coordinates (i,j); and,z_(ij) represents the image values at coordinates (i,j).

For the horizontal edge detection filter 58 shown in FIG. 5 g, thefilter can be expressed as follows, $\begin{matrix}{R_{X} = {{- {\sum\limits_{\substack{{i = 1}, \\ j = 1}}^{\underset{j = \quad N}{i = {{2\quad M} + 1}}}z_{i,j}}} + {\sum\limits_{\substack{i = 1 \\ j = {N + 2}}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}z_{i,j}}}} & (6)\end{matrix}$And this can be further expressed for each row as follows,$\begin{matrix}{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,1}}} & (7) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}\ldots\ldots} & (8) \\{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (9)\end{matrix}$Then the result of each row calculation is summed as follows,$\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}} & (10)\end{matrix}$where the center row (j=N+1) coefficient is 0.

In order to speed up the filter calculation for the whole image area 10of many filter positions 13, 13′ as illustrated in FIG. 12. Once thefilter 15 at the first position was calculated, the filter at the nextposition (as the filter moves one row down) is efficiently calculated byshifting the content of memories by one and calculating only the newestrow. This is schematically illustrated in FIG. 11. The memory contentsare shifted as follows,R_(X, 1)←R_(X,2)  (11)R_(X,2)←R_(X,3)  (12)R _(X,2N) ←R _(X,2N+1)  (13)

Finally, the newest row is calculated as follows, $\begin{matrix}{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (14)\end{matrix}$Then these terms or the contents of the memories are summed as follows,$\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}} & (15)\end{matrix}$

This efficient filter calculation may be illustrated in the flow chartshown in FIG. 9 b. The calculation may be illustrated using a horizontaledge detection filter such as edge detection filter 58 illustrated inFIG. 5 g. As shown in FIG. 9 b, the method of performing edge detectionusing the horizontal edge detection filter consisting of coefficients−1, 0 and 1 begins at the starting column 1, row 1 of an image. First,the first row may be calculated by adding all of the columns in theimage corresponding to the columns in the edge detection filter andstoring the results in memory #1. Then, the next row j may be calculatedby adding all corresponding columns in the edge detection filter andstoring the result in memory #j. These steps may be repeated until the(2N+1)^(th) row is calculated. Once row j=2N+1, the memory contents areadded or subtracted as necessary depending upon the sign (+/−) of thefilter coefficients and the results are summed from memories #1 through#2N+1. The result of this calculation is outputted as the filter output.Next, the memories are shifted as illustrated and described in FIG. 11.Returning now to FIG. 9 b, the edge detection filter 58 may then bemoved downwards on the image by one row. A check is then performed tomake sure that edge detection filter 58 is not beyond a boundary of therow or of the image. If filter 58 is beyond either boundary, the filteris moved over by one column and the process is begun once again at thenew column and at row 1. In addition, a check is performed to make surethat the edge detection filter is not beyond a boundary of the column orof the image. If filter 58 is beyond either boundary, then theprocessing ends. If, however edge detection filter 58 is not beyondeither boundary, the newest row 2N+1 is calculated and the resultsstored in memory #2N+1. Once again the memory contents of memories #1through 2N+1 are added or subtracted depending on the sign of the filtercoefficients to obtain the filter output result. This process isillustrated in FIG. 15 as an exemplary electronic circuit diagramdemonstrating the efficient calculation of the horizontal edge detectionfilter. As depicted, image pixel data may be read out from image memoryand fed to memory #2M+1 and shifted to memory #2M, . . . #1. All pixeldata forming the image in the same row may be summed at the summer 141and the summer's 141 output may be fed to memory #2N+1 and shifted tomemory #N+2, . . . #1. The contents of memory #2N+1 to #N+2 are addedwhile the contents of memory #N to #1 are subtracted at the summer inorder to calculate the filter output. Although edge detection filter 58has been illustrated with reference to advancing vertically from the topto the bottom of an image by single units, and then advancing from theleft to the right one unit at a time, and then repeating the process,the exemplar filters of the present invention are not so limited.Rather, the edge detection filters of the present invention are drawnbroadly to moving in two orthogonal directions, preferably from top tobottom and from left to right.

This can be extended to a more general form of the edge detection filterof coefficients 61, 63 as shown in FIGS. 6 a-b, where “a” can be aninteger or floating-point of positive or negative value. Anotherexemplary efficient filter operation is described in the followingsection.

For the horizontal edge direction, after calculating the rows as if allthe coefficients are 1, the row results are multiplied by thecoefficient of a, whereby multiplying each row result is more efficientthan multiplying each pixel data. $\begin{matrix}{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {a{\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}}} & (16) \\{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,1}}} & (17) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}\ldots\ldots} & (18) \\{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (19) \\{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {a{\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}}} & (20)\end{matrix}$

Once the horizontal edge detection filter was calculated for the firstposition, the content of the memories are shifted by one and only thenewest row is calculated as the filter moves down one row.R_(X,1)←R_(X,2)  (21)R_(X,2)←R_(X,3)  (22). . .. . .R _(X,2N) ←R _(X,2N+1)  (23)

Again, only the newest row may be calculated as follows $\begin{matrix}{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (24)\end{matrix}$

Then, the terms may be summed. $\begin{matrix}{R_{X} = {{{- a}{\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {a{\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}}} & (25)\end{matrix}$

This efficient calculation is illustrated by the flowchart shown in FIG.10 a, where α may be 1, −1 or other filter coefficient values asmentioned earlier.

A similar iteration technique can be used to calculate R efficiently fora more general filter using α_(j) $\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad{a_{j}R_{j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad{a_{{2N} + 2 - j}R_{j}}}}} & (26)\end{matrix}$

This can be efficiently calculated as follows $\begin{matrix}{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,1}}} & (27) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}\ldots\ldots} & (28) \\{R_{x,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (29) \\{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad{a_{j}R_{X,j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad{a_{{2\quad N} + 2 - j}R_{X,j}}}}} & (30)\end{matrix}$

Once the filter in the first position was calculated, we may shift thecontent of memories by one and calculate the newest row as the filtermoves down one row.R_(X,1)←R_(X,2)  (31)R_(X,2)←R_(X,3)  (32). . .. . .R _(X,2N) ←R _(X,2N+1)  (33)

Again, only the newest row may be calculated as follows $\begin{matrix}{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (34)\end{matrix}$

Then, the terms may be summed. $\begin{matrix}{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad{a_{j}R_{X,j}}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad{a_{{2\quad N} + 2 - j}R_{X,j}}}}} & (35)\end{matrix}$

The filter continues to move down one row and the calculation continuesuntil the filter position moves beyond the image row or the imageboundary. The filter position then moves to the first row of the nextcolumn position and continues the same operation.

For vertical edges, the filter in FIG. 5 h may be expressed by$\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad( {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,j}}} )}} & (36)\end{matrix}$

This calculation can be efficiently executed by an iteration techniqueas described before. $\begin{matrix}{R_{Y,1} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,1}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,1}}}} & (37) \\{{R_{Y,2} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,2}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}}\ldots\ldots} & (38) \\{R_{Y,{{2\quad N} + 1}} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,{{2\quad N} + 1}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}}} & (39) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad R_{Y,j}}} & (40)\end{matrix}$

Once the filter in the first position is calculated, the filter in thenext position may be calculated by only shifting the contents ofmemories and calculating only the newest row as follows,R_(Y,1)←R_(Y,2)  (41)R_(Y,2)←R_(Y,3)  (42). . .. . .R _(Y,2N) ←R _(Y,2N+1)  (43)and only the newest row is calculated as follows, $\begin{matrix}{R_{Y,{{2\quad N} + 1}} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,{{2\quad N} + 1}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}}} & (44)\end{matrix}$

This operation is depicted in FIG. 11. Furthermore, the flowchart inFIG. 9 a describes the iteration method at many positions in the wholeimage area. The method illustrated in FIG. 9 a is quite similar to thatillustrated above in FIG. 9 b. The primary difference between theseexemplary methods arises from the slightly different calculations withregard to the arrangement of the vertical edge detection filtercoefficients −1, 0, 1. It should be emphasized at this point that thepresent invention is directed to the use of horizontal and vertical edgedetection filters of any size having an arrangement of coefficients asillustrated in FIGS. 5 g and 5 h. It would be evident to one skilled inthe art to expand the application of any horizontal or vertical edgedetection filter configured as are those defined by the presentinvention using the same methodology outlined herein.

Returning again to FIG. 9 a, a vertical edge detection filter may beapplied at column 1, row 1 to the image. The first row may be calculatedthrough summation by adding or subtracting image pixels values,depending on the filter coefficient values, i.e. −1, 0 or 1, and furtherstoring the results of the summation in memory #1. Next, row j may becalculated through summation by adding and subtracting image pixelsvalues, depending on the filter coefficient values, i.e., −1, 0 or 1,and further storing the results in memory j. As described before withreference to FIG. 9 b, a check may then be performed to determine if the(2N+1)^(th) row has been calculated. If not, the next row j may becalculated, and the next rows may continue to be calculated in aninteractive fashion until the (2N+1)^(th) row is calculated. Whenj=2N+1, all of the memories are summed from memory #1 to memory #2N+1.The resulting summation results in the filter output. The memories arethen shifted as described above with reference to the horizontal edgedetection filter. The filter may be moved by one row, a check isperformed to see if the filter is out of the image row, and if not, thenewest row 2N+1 may be calculated through summation by adding andsubtracting image pixel values, depending on the filter coefficientvalues, i.e., −1, 0 or 1, and storing the results in memory #2N+1. FIG.13 illustrates an exemplary diagram of electronic circuits demonstratingthe exemplary method of the present invention to efficiently calculatethe vertical edge detection filter output. All image pixels data in thesame row are read out from image memory and fed to memory #2M+1, andshifted to memory #2M, . . . and #1. The image pixel data in the samerow may be summed or subtracted at the summer. All pixels data of thenext row may be read out and summed at the summer in the same fashion.This operation continues until the last row of the filter for one filterposition. The output, or result, of the summer may be fed to memory#2N+1 and shifted to memory #2N, . . . and #1. The contents of thememory #2N+1 to 1 may be summed to calculate the filter output.

The filter is moved down by one row position and the filter calculationcontinues until the filter goes beyond the image row or image boundary.

As described earlier, the filter coefficient values are not limited to−1, 0, 1 and can take a general form using a, or aj as shown below inEquation 45 $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad( {{{- a}{\sum\limits_{i = 1}^{i = M}\quad z_{i,j}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,j}}}} )}} & (45)\end{matrix}$where a can also equal 1, −1 or other values. Again, this filter can beefficiently calculated using the iteration technique as describedbefore. The first row to 2N+1 row in the filter mask are calculated asfollows, $\begin{matrix}{R_{Y,1} = {{{- a}{\sum\limits_{i = 1}^{i = M}\quad z_{i,1}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,1}}}}} & (46) \\{{R_{Y,2} = {{{- a}{\sum\limits_{i = 1}^{i = M}\quad z_{i,2}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}}}\ldots\ldots} & (47) \\{R_{Y,{{2\quad N} + 1}} = {{{- a}{\sum\limits_{i = 1}^{i = M}\quad z_{i,{{2\quad N} + 1}}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}}}} & (48) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad R_{Y,j}}} & (49)\end{matrix}$

As the filter is moved down by one row, the iteration operation may beused as follows.R_(Y,1)←R_(Y,2)  (50)R_(Y,2)←R_(Y,3)  (51). . .. . .R _(Y,2N) ←R _(Y,2N+1)  (52)and only the newest row may be calculated as follows, $\begin{matrix}{{R_{Y,{{2\quad N} + 1}} = {{{- a}{\sum\limits_{i = 1}^{i = M}\quad z_{i,{{2\quad N} + 1}}}} + {a{\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}}}}{{Using}\quad a_{i}}} & (53) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad( {{- {\sum\limits_{i = 1}^{i = M}\quad{a_{i}z_{i,j}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{a_{{2\quad M} + 2 - i}z_{i,j}}}} )}} & (54) \\{R_{Y,1} = {{- {\sum\limits_{i = 1}^{i = M}\quad{a_{i}z_{i,1}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{a_{{2\quad M} + 2 - i}z_{i,1}}}}} & (55) \\{{R_{Y,2} = {{- {\sum\limits_{i = 1}^{i = M}\quad{a_{i}z_{i,2}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{a_{{2\quad M} + 2 - i}z_{i,2}}}}}\ldots\ldots} & (56) \\{R_{Y,{{2\quad N} + 1}} = {{- {\sum\limits_{i = 1}^{i = M}\quad{a_{i}z_{i,{{2\quad N} + 1}}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{a_{{2\quad M} + 2 - i}z_{i,{{2\quad N} + 1}}}}}} & (57) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad R_{Y,j}}} & (58)\end{matrix}$

As the filter is moved down by one row, the iteration operation may beused as follows:R_(Y,1)←R_(Y,2)  (59)R_(Y,2)←R_(Y,3)  (60). . .R _(Y,2N) ←R _(Y,2N+1)  (61)and only the newest row may be calculated as follows, $\begin{matrix}{R_{Y,{{2\quad N} + 1}} = {{- {\sum\limits_{i = 1}^{i = M}\quad{a_{i}z_{i,{{2\quad N} + 1}}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{a_{{2\quad M} + 2 - i}z_{i,{{2\quad N} + 1}}}}}} & (62)\end{matrix}$

Other forms of iteration may be also used to speed up the filtercalculation in the whole image area as will be recognized by one skilledin the art. For example, for the vertical edges, after calculating thefilter result in the first position, the next row position may becalculated by adding the new row to the result of the first position andsubtracting the last row in the first position. The vertical edgedetection filter may be calculated as follows, $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad( {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,j}}} )}} & (63)\end{matrix}$

This result R_(Y) is stored in memory. The calculation result of eachrow expressed below may also be stored in memory #1 to #2N+1.$\begin{matrix}{R_{Y,1} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,1}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,1}}}} & (64) \\{{R_{Y,2} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,2}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}}\ldots\ldots} & (65) \\{R_{Y,{{2\quad N} + 1}} = {{- {\sum\limits_{i = 1}^{i = M}\quad z_{i,{{2\quad N} + 1}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}}} & (66)\end{matrix}$

Next, the filter moves down by one row and the filter of the newposition may be calculated as described below. First, the contents ofthe memories may be shifted as follow,R_(Y,0)←R_(Y,1)  (67)R_(Y,1)←R_(Y,2)  (68)R_(Y,2)←R_(Y,3)  (69). . .. . .R _(Y,2N) ←R _(Y,2N+1)  (70)R _(Y)←(R _(Y) −R _(Y,0) +R _(Y,2N+1))  (71)where the symbol ← indicates storing the right hand term into the lefthand term; R_(Y,0) indicates the first row result of the previousposition; and, R_(Y,2N+1) of the last operation indicates the newestcalculation result for the newest row. This calculation of the newestrow R_(Y,2N+1) is actually carried out. However, the summing operationrequires only one addition and one subtraction of the row results ratherthan 2N+1 additions of the previous iteration method. The R_(Y) valuefrom the previous position and stored in the memory may be used andupdated by the summing operation and stored in the memory again. Thisiteration technique may be extended to filter coefficients of a or ajjust like before. This operation of adding the newest row andsubtracting the oldest row is best illustrated in FIG. 11.

FIG. 14 illustrates yet another exemplary diagram of electronic circuitsdepicting the exemplary methods of the present invention. The electroniccircuits may comprise memory locations, accumulators, summers,multipliers, adders, digital signal processors, memory storage devices,combinations comprising at least one of the foregoing, and the like, toefficiently calculate this vertical edge detection filter. Whilediagrammed with reference to such physical circuit components, it isrecognized that the operations of the present invention may be performedin whole, or in part, by a digital signal processor (DSP). All pixels(image) data in the same row may be read out from image memory and fedto memory #2M+1 and shifted to memory #2M, . . . and #1. The pixel datain the same row may be summed or subtracted at the summer 141. Allpixels data of the next row are read out and summed at the summer in thesame fashion. This operation continues until reaching the last row ofthe filter for one filter position. The output (result) of the summer isfed to memory #2N+1 and shifted to memory #2N, . . . and #0. For thefirst filter position, the contents of the memory #2N+1 to 1 are summedto calculate the filter output as switches of memory #1 to 2N+1 are allclosed but switch of memory #0 is open. For the next filter position,switches of memory #0 and #2N+1 are closed while switches of memory #1to #2N are open to calculate the new filter output by adding the newestrow data (memory #2N+1) and subtracting the oldest row (memory #0) fromthe previous filter result, or output, of the summer's content.

As described earlier, the horizontal edge detection filter may beefficiently calculated as follows. $\begin{matrix}{R_{X} = {{- {\sum\limits_{{i = 1},{j = 1}}^{\underset{j = N}{i = {{2\quad M} + 1}}}\quad z_{i,j}}} + {\sum\limits_{{i = 1}{j = {N + 2}}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}\quad z_{i,j}}}} & (72) \\{R_{X,1} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,1}}} & (73) \\{{R_{X,2} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,2}}}\ldots\ldots} & (74) \\{R_{X,{{2\quad N} + 1}} = {\sum\limits_{i = 1}^{i = {{2\quad M} + 1}}\quad z_{i,{{2\quad N} + 1}}}} & (75) \\{R_{X} = {{- {\sum\limits_{j = 1}^{j = N}\quad R_{X,j}}} + {\sum\limits_{j = {N + 2}}^{j = {{2\quad N} + 1}}\quad R_{X,j}}}} & (76)\end{matrix}$

The filter output of the first position may be stored in memory. Also,the calculation results of each row may be stored in memories #1 to#2N+1. Then the filter is moved down by one row and the filter output inthe new position may be efficiently calculated as follows. First thecontents of memories #1 to #2N+1 may be shifted as follows,R_(X,0)←R_(X,1)  (77)R_(X,1)←R_(X,2)  (78)R_(X,2)←R_(X,3)  (79). . .. . .R _(X,2N) ←R _(X,2N+1)  (80)R _(X)←(R _(X) +R _(X,0) −R _(X,N) −R _(X,N+1) +R _(X,2N+1))  (81)

Only R_(X,2N+1) at the new position is actually calculated and stored inmemory #2N+1 while all other terms in the right side may be in thememories. The R_(X) value, from the previous position and recentlystored in the memory, may be used and updated by the summing operationand stored in the memory again. FIG. 16 illustrates yet anotherexemplary electronic circuits diagram of an exemplary method of thepresent invention. The electronic circuits may comprise memorylocations, accumulators, summers, multipliers, adders, digital signalprocessors, memory storage devices, combinations comprising at least oneof the foregoing, and the like, to efficiently calculate this horizontaledge detection filter. Image pixel data may be read out from imagememory and fed to memory #2M+1 and shifted to memory #2M, . . . #1. Allpixels data in the same row may be summed at the summer, and thesummer's output fed to memory #2N+1 and shifted to #N+2, . . . and #0.For the first filter position, the contents of memory #2N+1 to #N+2 maybe added while the contents of memory #N to #1 may be subtracted at thesummer in order to calculate the filter output. Switches at memoriesfunction to achieve this operation. All switches except memory #N+1 and#0 are closed for the first filter position. Once the filter output iscalculated, the new pixel data in the next row may enter memory #2M+1 to#1, summed at the summer, and this output or the newest summed row datafrom the next filter position may enter memory #2N+1. In the meantime,the contents of memory #2N+1 to 0 may all be shifted right by onememory. The filter result output, or the content of the summer from theprevious filter position, may then be updated for the new position byadding the content of memory #2N+1 and #0 and subtracting the contentsof memory #N+1 and #N. Again, as described beforehand, switches functionto achieve this operation. Switches at memory #2N+1, #N+1, #N and #0 areclosed while all other switches are open.

This iteration method saves the number of additions. These operations ofvertical and horizontal edges may be expanded to have coefficients of a,−a, 0, or aj as before. With these coefficients, the iteration methodsaves the number of multiplications as well as additions, thusincreasing the filter's speed.

The most general form of the edge detection filter is as follows,$\begin{matrix}{R = {\sum\limits_{{i = 1}{j = 1}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}\quad{a_{i,j}z_{ij}}}} & (82)\end{matrix}$

However, the filter can be of symmetrical form as follows For thehorizontal edge detection filter,a _(i,2N+2−j) =−a _(i,j)  (83)anda _(i,N+1)=0  (84)where i=1 to 2M+1 and j=1 to Nanda _(2M+2−i,j) =a _(i,j)  (85)where i=1 to M and j=1 to 2N+1. This horizontal edge detection filter isillustrated in FIG. 7 a as an exemplary embodiment of a 9×9 filter 71 ofthe present invention.

Furthermore, a_(i,j) is split into x and y components for the horizontaledge detection filter as followsa _(i,j) =b _(i) ·c _(j)  (86)b _(2M+2−i) =b _(i)  (87)where i=1 to MAlso−c _(2N+2−j) =c _(j)  (88)where j=1 to NFinally the horizontal edge detection filter may be expressed asfollows, $\begin{matrix}{R_{X} = {{- {\sum\limits_{{i = 1}{j = 21}}^{\underset{j = N}{i = {{2\quad M} + 1}}}{b_{i}c_{j}z_{ij}}}} + {\sum\limits_{{i = 1}{j = {N + 2}}}^{\underset{j = {{2\quad N} + 1}}{i = {{2\quad M} + 1}}}\quad{b_{i}c_{{2\quad N} + 2 - j}z_{ij}}}}} & (89)\end{matrix}$Again, as described earlier, this filter may use the iteration techniquedescribed beforehand to increase the calculation speed.

For the vertical edge detection filter, filter coefficients a_(i,j) alsohave symmetry, with the exception of the sign (+/−).a _(2M+2−i,j) =−a _(i,j)  (90)anda _(M+1,j)=0  (91)where i=1 to M and j=1 to 2N+1.Alsoa _(i,2N+2−j) =a _(i,j)  (92)where i=1 to 2M+1 and j=1 to N.This vertical edge detection filter is illustrated in FIG. 7 b asanother exemplary embodiment of a 9×9 filter 73 of the presentinvention.

Furthermore, a_(i,j) is split into x and y components for the verticaledge detection filter as followsa _(i,j) =b _(i) ·c _(j)  (93)−b _(2M+2−i) =b _(i)  (94)where i=1 to Mc _(2N+2−j) =c _(j)  (95)where j=1 to NFinally the vertical direction filter may be expressed as follows,$\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad N} + 1}}\quad{c_{j}( {{- {\sum\limits_{i = 1}^{i = M}\quad{b_{i}z_{ij}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{b_{{2\quad M} + 2 - i}z_{ij}}}} )}}} & (96)\end{matrix}$Furthermore, this filter may use the iteration technique describedearlier to increase the calculation speed.

In circumstances where the filter is a square mask and M=N, both edgedetection filters, that is, the edge detection filters of 2 directions,need to be equally weighted in the directions and thus|b_(i)|=|c_(i)|  (97)except for the center row for the horizontal edge detection filter andthe center column for the vertical edge detection filter. Also the samesymmetrical properties, which were previously discussed, apply to thesecoefficients as well. Therefore, the edge detection filters where M=Nmay be expressed as follows. $\begin{matrix}{R_{X} = {{- {\sum\limits_{{i = 1}{j = 1}}^{\underset{j = M}{i = {{2\quad M} + 1}}}\quad{b_{i}b_{j}z_{ij}}}} + {\sum\limits_{{i = 1}{j = {M + 2}}}^{\underset{j = {{2\quad M} + 1}}{i = {{2\quad M} + 1}}}\quad{b_{i}b_{{2\quad M} + 2 - j}z_{ij}}}}} & (98)\end{matrix}$

This horizontal edge detection filter is illustrated in FIG. 8 a whichdepict an exemplary embodiment of an 9×9 filter 81 of the presentinvention. This horizontal edge detection filter may be efficientlycalculated using the exemplary method illustrated by the exemplaryelectronic circuit diagram shown in FIG. 17. Image data may be read outfrom image memory and fed to memory #2M+1 and shifted to memory #2M, . .. #1. The contents of these memories may be multiplied by coefficientsb1, . . . ,b2M+1 and summed at the summer. The output of summer may befed to memory #2N+1 and shifted to memory #2N, . . . #0. For the firstfilter position, the contents of memory #2N+1 to #1 excluding #N+1 maybe multiplied by coefficients and summed at the summer to calculate thefilter output. For the next filter position, the new image data for thenewest row may be read out from the image memory, fed to memory #2M+1,and shifted. The contents of memory #2M+1 to 1 may then be multiplied bycoefficients and summed at the summer, and the summer's output may befed to memory #2N+1. Meantime, the contents of memory #2N+1 to #0 may beshifted to the right by one memory. The filter output or the content ofthe summer may be updated by adding the value of memory #2N+1 multipliedby coefficient b1, subtracting the values of memory #N+1 and #Nmultiplied by bN, and adding the value of memory #0 multipliedcoefficient b1 to the filter output of the previous position, or thesummer's content. $\begin{matrix}{R_{Y} = {\sum\limits_{j = 1}^{j = {{2\quad M} + 1}}\quad{b_{j}( {{- {\sum\limits_{i = 1}^{i = M}\quad{b_{i}z_{ij}}}} + {\sum\limits_{i = {M + 2}}^{i = {{2\quad M} + 1}}\quad{b_{{2\quad M} + 2 - i}z_{ij}}}} )}}} & (99)\end{matrix}$where M=N.

This vertical edge detection filter is illustrated in FIG. 8 b whichdepicts an exemplary embodiment of a 9×9 filter 83 of the presentinvention. The exemplary method illustrated by the exemplary electroniccircuit shown in FIG. 18 can efficiently calculate the vertical edgedetection filter output. Image data may be read out from image memory,fed to memory #2M+1, and shifted to #2M to #1. These column pixel datain the same row may be multiplied by coefficients, and summed, that is,added or subtracted, at the summer as shown in FIG. 18. The summer'soutput may be fed to memory #2N+1 and shifted right by one memory asmore summation data in a row are fed to memory #2N+1. For the firstfilter position, the contents of memory #2N+1 to 1 may be multiplied andsummed at the summer to calculate the filter output. For the nextposition, the result of the first filter position may be used toefficiently calculate the next result. As the new summed data of thenewest row for the new filter position is fed to memory #2N+1, allmemory contents may be shifted right and the new filter output iscalculated by adding memory #2N+1 content multiplied by coefficient b1,and subtracting memory #0 multiplied by b1 from the previous filterresult or the content of the summer.

In yet another exemplary embodiment, the filters may move upwardstarting from the bottom row. In another embodiment, the filter may movelaterally, for example, to the right, starting from the far left column.In yet another exemplary embodiment, the filters may move laterally tothe left, starting from the far right column.

In yet another embodiment of the present invention, edges may bedetected by edge detection filters and enhanced by an edge enhancementfilter. Such edge enhancement filters include, but are not limited to,two-dimensional high-pass filters, low-pass filter, band-pass filters,and the like.

The strength and type of these edge enhancement filters being employedare determined by the edge detection filter(s) outputs, i.e., themagnitude and direction. In a preferred embodiment, the edge enhancementfilter may be a spatial two-dimensional filter expressed by thefollowing equation, $\begin{matrix}{z_{ip} = {\sum\limits_{\substack{i = 1 \\ j = 1}}^{\substack{i = {{2M} + 1} \\ j = {{2N} + 1}}}{w_{ij}z_{ij}}}} & (100)\end{matrix}$where zip represents the image intensity of the processed data; w_(ij)represents the filter coefficients at coordinates (i,j); and, z_(ij)represents the image data at coordinates (i,j) before processing.

In a preferred embodiment, the filter coefficients of the edgeenhancement filter are directional just like the edge detection filter.The direction of the detected edge is usually defined by the directionof the highest spatial derivative in the field of image processing. Inthe present invention, however, the direction of a detected edge isdefined as a direction perpendicular to the direction of the highestspatial derivative of the image intensity of the target pixel.Therefore, the edge enhancement filter is directional and has smoothingeffects, or low-pass filtering, in a direction ∂ of the detected edge,as defined above, or perpendicular to the direction of the highestspatial derivative at the target pixel. Furthermore, the detected edgemay be enhanced by applying high-pass filtering which has sharpeningeffects in the direction of the highest spatial derivative.Alternatively, a low-pass filter of lesser degree than the one in thedirection ∂ may be applied in the direction of the highest spatialderivative. The direction of ∂ and the direction of the highest spatialderivative may be approximated within a few degrees, such as ten (10)degrees higher or lower. This approximation may also be as much as 30 or40 degrees higher or lower in the direction of ∂ and the direction ofthe highest spatial derivative. In yet another alternative embodiment,band-pass filtering may be applied to enhance the edge in the directionof the highest spatial derivative. In yet another alternative embodimentno filtering (i.e. all-pass filtering) may be applied in the directionof the highest spatial derivative. The strength of the edge enhancementin the direction of the highest spatial derivative may be proportionalto the magnitude of the detected edge, i.e., the strength is high if theedge's magnitude is high; or the strength is low if the edge's magnitudeis low.

For example, if the horizontal edge detection filter 193 shown in FIG.19 b detects a strong horizontal edge in an image, a low-pass filter 201shown in FIG. 20 a will be applied to enhance the strong horizontaledge. The output of the horizontal edge detection filter 193 isnormalized by a filter normalization factor of five (5) whichcorresponds to the total number of filter coefficients equal to one inthe horizontal edge detection filter 193. If a weaker horizontal edgewith a smaller magnitude but having the same direction is detected, aweaker low-pass horizontal filter 203 as illustrated in FIG. 20 b willbe used. The output of the weaker low-pass horizontal filter 203 isnormalized by a filter normalization factor of three (3). If thevertical edge detection filter 191 in FIG. 19 a instead of thehorizontal edge detection filter detects a strong vertical edge in theimage, the vertical edge enhancement filter 211 in FIG. 21 a will beapplied to enhance the edge. If a weaker vertical edge with a smallermagnitude but the same direction is detected, a weaker low-pass verticalfilter 213 as illustrated in FIG. 21 b will be used. For the diagonaldirection of +45 degrees, an edge detection filter shown in FIG. 19 cmay be used to detect an edge which may be enhanced by one or more ofthe exemplary edge enhancement filters shown in FIGS. 22 a and 22 b. Forthe diagonal direction of −45 degrees, an edge detection filter shown inFIG. 19 d may be used to detect an edge which may be enhanced by one ormore of the exemplary edge enhancement filters shown in FIG. 23 a or 23b.

In a preferred embodiment, the direction ∂ of the edge may be determinedby equation 103 (shown below) and calculated using the ratio of thevertical to horizontal edge detection filter outputs (R_(X)/R_(Y)). Thismethod of calculation utilizing only two (2) edge detection filters,i.e., the vertical and horizontal filters, is preferred as performingcalculations using data from two edge detection filters is much fasterthan calculating, for example, twenty (20) edge detection filters fortwenty (20) directions as previously described. These two edge detectionfilters of the present invention are expressed in equation 101 and 102as follows, $\begin{matrix}{R_{X} = {{- {\sum\limits_{\substack{i = 1 \\ j = 1}}^{\substack{i = {{2M} + 1} \\ j = N}}z_{i,j}}} + {\sum\limits_{\substack{i = 1 \\ j = {N + 2}}}^{\substack{i = {{2M} + 1} \\ j = {{2N} + 1}}}z_{i,j}}}} & (101) \\{R_{Y} = {\sum\limits_{j = 1}^{j = {{2N} + 1}}( {{- {\sum\limits_{i = 1}^{i = M}z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}} )}} & (102)\end{matrix}$

The direction (∂) and magnitude of an edge are determined by equation103 and 104 shown below. $\begin{matrix}{\vartheta = {\tan^{- 1}\frac{R_{Y}}{R_{X}}}} & (103) \\{{magnitude} = {( {R_{X}^{2} + R_{y}^{2}} )^{0.5} \approx {{R_{X}} + {R_{Y}}}}} & (104)\end{matrix}$

Since R_(X) and R_(Y) values depend on each filters respective size andcoefficients, R_(X) and R_(Y) may be normalized or divided by the sum ofthe absolute values of all the filter coefficients to yield thenormalized values NR_(X) and NR_(Y) in equations 105, 106. In this case,the sum becomes the number of non-zero coefficients since all non-zerocoefficients are either 1 or −1. The normalized magnitude of the edge isthus obtained by equation 107. $\begin{matrix}{{NR}_{X} = {\frac{1}{( {{2M} + 1} )( {2N} )}( {{- {\sum\limits_{\substack{i = 1 \\ j = 1}}^{\substack{i = {{2M} + 1} \\ j = N}}z_{i,j}}} + {\sum\limits_{\substack{i = 1 \\ j = {N + 2}}}^{\substack{i = {{2M} + 1} \\ j = {{2N} + 1}}}z_{i,j}}} )}} & (105) \\{{NR}_{Y} = {\frac{1}{( {2M} )( {{2N} + 1} )}{\sum\limits_{j = 1}^{j = {{2N} + 1}}( {{- {\sum\limits_{i = 1}^{i = M}z_{i,j}}} + {\sum\limits_{i = {M + 2}}^{i = {{2M} + 1}}z_{i,j}}} )}}} & (106) \\{{normalized\_ magnitude} = {( {{NR}_{X}^{2} + {NR}_{y}^{2}} )^{0.5} \approx {{{NR}_{X}} + {{NR}_{Y}}}}} & (107)\end{matrix}$However, for a given size and given filter coefficients of the edgedetection filters, this normalization, or division, step is notnecessary and can be eliminated to speed up the processing. Examples ofthe vertical and horizontal edge detection filters are illustrated inFIGS. 19 a and 19 b. For purposes of illustration, the size of thefilters may be 5×5, where M=N=2. As one of ordinary skill in the artwill recognize, the filter size can be, for example, smaller or largerthan this size and can be for example, 3×3, 7×7, 9×9 or larger.

An edge's direction, as defined in equation 103, varies from −90 to 90degrees, or a range of 180 degrees, in an analog or continuous fashion.However, the number of edge enhancement filter directions may be limitedto about 18 to cover all 180 degrees at increments of about 10 degrees.For example, the first direction may range from −90 degrees to −80degrees. The second direction may encompass from −80 degrees to −70degrees. And, the 18th direction may encompass from 80 degrees to 90degrees. Other selections of angles or directions may be made. Althoughonly two (2) are shown for the purposes of illustration in FIGS. 20 aand 20 b, the number of filters in one direction can be one or more, andtypically several, to provide various degrees of filter strength. Inanother embodiment, the number of the filter's directions can be reducedto about nine (9) or less with an angle increment of about 20 degrees orgreater. The finite number of directions and degrees, that is, strengthas in stronger or weaker, of the vertical and horizontal edgeenhancement filters make it possible to store in a memory storage deviceor a look-up table (LUT) all of the image filters and their filtercoefficients necessary to perform image processing including, but notlimited to, edge enhancement and noise reduction.

In a preferred embodiment, if the magnitude of the edge described inequation 104 is lower than some threshold, the speckle noise reductionfilter or a non-directional smoothing filter is applied rather than thedirectional edge enhancement filter described previously. The method ofthe present invention also determines if the non-directional smoothingfilter should be applied based upon the output, i.e., the magnitude ofthe vertical and horizontal edge detection filters of the presentinvention described previously.

With reference to FIG. 25 a, there is illustrated a flow chart of thelogic of the method of the present invention. As will be described morefully below, with reference to step 1, an edge detection filter isapplied to an image to produce an edge detection value, or the magnitudein equation 104, for a given target pixel. Next, with reference to step2, the edge detection value is checked to see if it is greater than athreshold value. The threshold value may assume any value and is chosensuch that an edge detection value greater than the threshold value isindicative of the presence of an edge at the site of the target pixel.Conversely, a threshold value less than or equal to the edge detectionvalue, is indicative of a target pixel which does not form part of anedge, but rather is part of a homogeneous area. If the edge detectionvalue is not greater than the threshold value, indicating a target pixelwhich forms part of a homogeneous area, smoothing is applied by asmoothing filter to the target pixel in step 3. Conversely, if the edgedetection value is greater than the threshold value, indicating that thetarget pixel is part of an edge, edge enhancement may be applied by anedge enhancement filter in step 4. After applying the method illustratedin FIG. 25 a to determine whether the edge magnitude is greater than thethreshold value and whether the target pixel belongs to an edge, amethod of selecting an edge enhancement filter is illustrated in FIG. 25b.

Referring now to FIG. 25 b, the edge direction is first evaluated todetermine whether the value of the direction is greater than or equal toa lower direction threshold value, Direction J (“DirJ”), but less thanan upper direction threshold value, Direction J+1 (“Dir(J+1)”). If valueof the direction is greater or equal to the lower direction thresholdvalue and less than the upper directional threshold value, thenDirection J will be selected. Next, the edge's magnitude is evaluatedagain and an edge enhancement filter of appropriate strength will beselected. Referring now to FIG. 25 c, FIG. 25 c illustrates a flow chartfor the selection of a non-directional smoothing filter of the presentinvention. This selection is performed once the method of FIG. 25 adetermines that an image target pixel is not an edge and thus requiresnon-directional smoothing. The strength of the required non-directionalsmoothing is determined by evaluating the edge magnitude as shown in theflowchart of FIG. 25 c.

The edge detection filters 191, 193 determine whether an image targetpixel belongs to an edge or constitutes a homogeneous tissue area. Themagnitude of the edge detection filter output as expressed in equation104 is used to determine whether the target pixel belongs to an edge ora ‘strong’ or ‘steep’ edge. If the target pixel belongs to a homogeneoustissue area, a two-dimensional, non-directional smoothing filter 241,243, as shown in FIGS. 24 a and 24 b, may be applied to the targetpixel. If the edge detection filter does not detect a magnitudeconstituting a significant edge, a non-directional smoothing filter 241,243 will be used to reduce speckles. The smoothing filter may comprise atwo-dimensional filter, e.g., low-pass, median, smoothing, and the like.Furthermore, the strength or degree of the smoothing filter isdetermined by the output, i.e., the magnitude in equation 104, of thevertical and horizontal edge detection filters previously described. Thedegree or strength of the smoothing filter increases as the magnitude inEquation 104 decreases. In other words, a greater degree of smoothingwill be applied if the detected magnitude is small. The two-dimensionalsmoothing filter is non-directional. In FIG. 24 a, the filter output isnormalized by a factor of twenty-five (25). If stronger smoothing isrequired, a stronger filter in FIG. 24 a can be used instead of thefilter in FIG. 24 b which is weaker.

Referring now to FIG. 26, FIG. 26 illustrates a diagram of an imagefiltering system of the present invention to implement the imageprocessing methods previously described. Once the direction andmagnitude of an edge is calculated by the edge detection filter and fedto the filter select look-up table, the selection of a two-dimensionalimage filter, or the filter coefficient values corresponding to atwo-dimensional image filter, may be performed by the Filter SelectLook-up-Table 263. Generally, a set of image filters may comprise anynumber of image filters, for example, about thirty image filters. Theset of image filters correspond to a single clinical application such asa liver image, a breast image, any other organ image, and the like. Eachimage filter may comprise a plurality of filter coefficients, forexample, about one hundred filter coefficients. For example, referringto the Look-up-Table of FIG. 27, each cell represents one image filtercontaining its respective image filter coefficients.

A plurality of filter coefficients are downloaded from LUT 263 to animage process filter 261 and applied to the original image to yield anoutput image on a pixel-by-pixel basis. In the meantime, image processfilter 261 updates or changes its image filter coefficients on apixel-by-pixel basis based on the edge detection filter's outputs, themagnitude and the direction. Image process filter 261 may comprise anon-directional smoothing filter or a directional edge enhancementfilter based upon the direction and magnitude of the edge at the targetpixel on a pixel-by-pixel basis as previously described. Image processfilter 261 and Image Processor 269 may be implemented by one or moreapparatus such as digital signal processors, multipliers, adders, memorystorage devices and the like, and preferably digital signal processors.When an ultrasound system changes its application mode from one clinicalapplication to another, e.g. breast imaging to liver imaging, or heartimaging, a new set of filters and their filter coefficients in theLook-up-table need to be downloaded or inputted from another device suchas a memory storage device 265.

Filter Select Look-up-Table 263 may comprise a plurality of imagefilters, or filter coefficient values corresponding to the plurality ofimage filters, which may be temporarily stored and utilized pursuant toeach clinical application, that is, a liver image, a breast image, anyother organ, and the like. Preferably, Filter Select Look-up-Table 263contains only a set of image filters for one clinical application at atime, and a limited number of image filters and their filtercoefficients at a time due to a limited size of the memory allotted tothe Look-up-Table. In the alternative, Look-up-Table 263 contains a setof image filters for a clinical application currently in use, and storesone or more additional set(s) of image filters for other clinicalapplications pursuant to the storage capacity of Look-up-Table 263.Filter Select Look-up-Table 263 receives a set of image filters for oneclinical application at a time from a memory storage device 265 and/oran apparatus 267 capable of generating a plurality of image filters anda plurality of sets of image filter coefficients. Such an apparatus 267may comprise a device with a central processing unit (CPU), digitalsignal processors, and the like, and preferably digital signalprocessors.

One or more memory storage devices 265 store a plurality of sets ofimage filters for a plurality of clinical applications, and forwards oneset, for example, about thirty (30), of image filters and their filtercoefficients for one clinical application upon request to the FilterSelect Look-up-Table 263. Memory storage devices 265 in communicationwith Look-up-Table 263 may download or input one or more sets of imagefilters into Look-up-Table 263. One or more apparatus 267 capable ofgenerating image filter or image filter coefficients may be incommunication with Look-up-Table 263 and memory storage device 265, orwith Look-up-Table 263 alone. For example, apparatus 267 may download orinput one or more sets of image filters into memory storage device 265for temporary storage prior to transfer to Look-up-Table 263, or toLook-up-Table 263 directly. Any manual or electronic operation thatfacilitates the transferring, inputting and/or downloading of such datafrom apparatus 267 to memory storage device 265 or Table 263, or frommemory storage device 265 to Table 263 such as electronic circuitry, viawire, cable, wireless, and the like, may be utilized as well as othersuch operations known to one of ordinary skill in the art.

Referring now to FIG. 27, FIG. 27 illustrates an exemplary embodiment ofLUT 263. One image filter represents and contains its set of filtercoefficients stored in the LUT. This LUT is only for illustrationpurpose and can be larger or smaller. In other words, the number ofdirections and magnitude levels can be smaller or larger than thisexample of nine (9) directions and five (5) magnitude levels. In thisexample, the directions are equally spaced at an interval of 20 degreesbut an unequal interval can be also used.

In this exemplary embodiment of the LUT, the nine (9) filter directions(−80, −60, −40, −20, 0, 20, 40, 60, 80 degrees) are depicted in thehorizontal axis while the five (5) levels of edge magnitude are shown inthe vertical axis. Each cell in the LUT represents an image filter andtheir filter coefficients for either smoothing, e.g., SM2, or edgeenhancement, e.g., E6M4. For example, the filter direction of −60degrees encompasses-70 to −50 degrees of the edge direction ∂ obtainedby the edge detection filter. In other words, one direction valuerepresents a designated direction value range of plus/minus (+/−) 10degrees, or a range of 20 degrees. If the magnitude of the edge is lowerthan magnitude1 (“Mag1”), a non-directional smoothing filter SM1 will beselected regardless of the edge direction value. If the magnitude of theedge is lower than magnitude2 (“Mag2”) but greater than or equal toMag1, a non-directional smoothing filter SM2 will be selected regardlessof the edge direction value. However, if the edge's magnitude is greaterthan or equal to a value of Mag2, an edge enhancement filter will beselected. For example, if 9 is 25 degrees and the edge's magnitude ishigher than or equal to Mag3 but lower than Mag4, the edge enhancementfilter E2M4 will be selected.

One or more embodiments of the present invention have been described.Nevertheless, it will be understood that various modifications may bemade without departing from the spirit and scope of the invention.Accordingly, other embodiments are within the scope of the followingclaims.

1. A method for detecting and enhancing edges in an ultrasound image,comprising the steps of: applying an edge detection filter to at leastone of a plurality of pixels of an ultrasound image to compute an edgedetection value comprising a magnitude and a direction; and applyingeither a directional edge enhancement filter or a non-directionalsmoothing filter to said at least one of said plurality of pixels ofsaid ultrasound image.
 2. The method of claim 1, wherein said ultrasoundimage is selected from the group consisting of B-mode tissue images,Doppler spectrum images, blood flow images, elasticity images, grayscaleimages, intensity images and combinations comprising at least one of theforegoing images.
 3. The method of claim 1, wherein said applying eithersaid directional edge enhancement filter or said non-directionalsmoothing filter further comprises applying a directional edgeenhancement filter selected from the group consisting of high-passfilters, low-pass filters and band pass filters.
 4. The method of claim1, wherein said applying said edge detection filter comprises applying avertical edge detection filter whose output is R_(Y).
 5. The method ofclaim 1, wherein said applying said directional edge detection filtercomprises applying a horizontal edge detection filter whose output isR_(X).
 6. The method of claim 1, comprising the additional step ofcalculating a direction of an edge comprising: calculating an outputR_(X) from a horizontal edge detection filter; calculating an outputR_(Y) from a vertical edge detection filter; and calculating saiddirection ∂ of said edge using an equation$\vartheta = {\tan^{- 1}{\frac{R_{Y}}{R_{X}}.}}$
 7. The method of claim1, wherein said direction of said edge comprises a directionperpendicular to a direction of a highest spatial derivative of an imageintensity at a target image pixel of said plurality of pixels of saidultrasound image.
 8. The method of claim 1, wherein said direction is aprimary direction, wherein said primary direction is associated with anapproximate direction comprising a range of −90 degrees to +90 degrees,wherein said range further comprises a plurality of directions and saidprimary direction is assigned a direction falling within said range. 9.The method of claim 8, wherein said range is measured in a plurality ofincrements, wherein said plurality of increments represent a finitenumber of directions.
 10. The method of claim 1, comprising theadditional step of calculating said magnitude of an edge using anequation |R_(X)|+|R_(Y|.)
 11. The method of claim 1, comprising theadditional step of calculating said magnitude of an edge using anequation (R_(X) ²+R_(Y) ²)^(0.5).
 12. The method of claim 1, whereinsaid applying either said directional edge enhancement filter or saidnon-directional smoothing filter comprises the steps of comparing saidmagnitude with a threshold value; detecting an edge at said at least oneof said plurality of pixels when said magnitude is greater than saidthreshold value; and enhancing said edge using said directional edgeenhancement filter.
 13. The method of claim 1, comprising the additionalstep of enhancing a detected edge of said at least one of said pluralityof pixels by smoothing said detected edge in a direction perpendicularto a direction of a highest spatial derivative of an image intensity ofa target pixel; applying a filter selected from the group consisting ofan all-pass filter, a high-pass filter, a band-pass filter, a smoothingfilter, a low-pass filter and combinations comprising at least one ofthe foregoing filters in said direction of said highest spatialderivative of an image intensity of target.
 14. The method of claim 13,comprising the additional step of selecting a directional edgeenhancement filter prior to said enhancement step comprising the stepsof calculating said direction and said magnitude of said detected edgeby said edge detection filter; feeding said direction and said magnitudeof said detected edge to a filter select look-up table; and selectingsaid directional edge enhancement filter based upon said direction andsaid magnitude of said detected edge.
 15. The method of claim 14,wherein said selection of said directional edge enhancement filtercomprises selecting a strong edge enhancement filter when said magnitudeof said edge is high.
 16. The method of claim 14, wherein said selectionof said directional edge enhancement filter comprises selecting a weakedge enhancement filter when said magnitude of said edge is low.
 17. Themethod of claim 1, comprising the additional step of enhancing adetected edge of said at least one of said plurality of pixels bysmoothing said detected edge in an approximated direction falling withinan approximated upper direction boundary and an approximated lowerdirection boundary of a range of directions, wherein said range includesa primary direction of said detected edge.
 18. The method of claim 17,said enhancement step comprises applying additionally a filter selectedfrom the group consisting of an all-pass filter, a high-pass filter, aband-pass filter, a low-pass filter, a smoothing filter and combinationscomprising at least one of the foregoing filters in a directionapproximately perpendicular to said approximated direction.
 19. Themethod of claim 13, comprising the additional step of selecting saidedge enhancement filter prior to said enhancement step comprising thesteps of selecting a range of directions comprising a lower directionboundary Dir(J) and an upper direction boundary Dir(J+1), wherein saidrange includes said direction of said detected edge selecting a range ofmagnitudes comprising a lower magnitude boundary (#P) and an upperdirection boundary (#P+1), wherein said range includes said magnitude ofsaid detected edge; and selecting said directional edge enhancementfilter based upon said selected range of directions approximate to saiddirection of said detected edge and based upon said selected range ofmagnitudes approximate to said detected magnitude of said detected edge.20. The method of claim 1, comprising the additional step of enhancing adetected homogeneous area of said at least one of said plurality ofpixels by smoothing said detected homogeneous area using saidnon-directional, smoothing filter, wherein said non-directional,smoothing filter is selected from a group consisting of anon-directional low-pass filter, a non-directional band-pass filter, amedian filter, and combinations comprising at least one of the foregoingfilters.
 21. The method of claim 20, comprising the additional step ofselecting a non-directional, smoothing filter prior to said enhancementstep comprising the steps of calculating said magnitude of a detectedhomogenous area by said edge detection filter; feeding said magnitude ofsaid detected homogeneous area to a filter select look-up table; andselecting said non-directional smoothing filter based upon saidmagnitude of said homogeneous area.
 22. The method of claim 21, whereinsaid selection of said non-directional, smoothing filter comprisesselecting a strong non-directional, smoothing filter when said magnitudeof said homogeneous area is low.
 23. The method of claim 21, whereinsaid selection of said non-directional, smoothing filter comprisesselecting a weak non-directional, smoothing filter when said magnitudeof said homogeneous area is high.
 24. The method of claim 20, comprisingthe additional step of selecting said non-directional, smoothing filterprior to said enhancement step comprising the steps of selecting a rangeof magnitudes comprising a lower threshold value boundary (#Q−1) and anupper threshold value boundary (#Q), wherein said range includes saidmagnitude of said detected edge; and selecting a non-directionalsmoothing filter based upon said selected range of magnitudesapproximate to said magnitude of said selected edge.
 25. A method fordetecting and enhancing edges in an ultrasound image comprising thesteps as illustrated in FIG. 25 a.
 26. The method of claim 1, whereinsaid applying said edge enhancement filter to said at least one of saidplurality of pixels of said ultrasound image comprises applying an edgeenhancement filter selected from the group consisting of FIG. 20 a, FIG.20 b, FIG. 21 a, FIG. 21 b, FIG. 22 a, FIG. 22 b, FIG. 23 a and FIG. 23b.
 27. A method for detecting and enhancing edges in an ultrasound imagecomprising the steps of: applying a two-dimensional edge detectionfilter to at least one of a plurality of pixels of an ultrasound imageto compute an edge detection value comprising a magnitude and adirection; applying a directional edge enhancement filter to an edge ofsaid at least one of said plurality of pixels of said ultrasound image;and applying a non-directional smoothing filter to a homogeneous area ofsaid at least one of said plurality of pixels of said ultrasound image.28. The method of claim 27, wherein said applying said two-dimensionaledge detection filter comprises applying said two-dimensional edgedetection filter in either a vertical direction or a horizontaldirection.
 29. The method of claim 27, comprising the additional step ofdetecting an edge at said at least one of said plurality of pixels priorto said application of said directional edge enhancement comprising thesteps of: comparing said magnitude of said edge detection value with athreshold value; and detecting said edge at said at least one of saidplurality of pixels of said image when said magnitude is greater thansaid threshold value.
 30. The method of claim 27, wherein said applyingsaid directional edge enhancement filter comprises applying adirectional edge enhancement filter at a strength proportional to saidmagnitude of said edge detection value.
 31. An image processor for anultrasound device comprising: an edge detection filter; a filter selectlook-up table; and an image process filter, wherein said edge detectionfilter, said filter select look-up table and said image process filterare in communication with each other.
 32. The image processor of claim31, wherein said edge detection filter detects either a presence or anabsence of an edge in at least one of a plurality of pixels of anultrasound image and generates a magnitude and a direction of said edge.33. The image processor of claim 32, wherein said magnitude isproportional to a strength of said edge.
 34. The image processor ofclaim 32, wherein said ultrasound image is an image selected from thegroup consisting of B-mode tissue images, Doppler spectrum images, bloodflow images, elasticity images, grayscale images, intensity images, andcombinations comprising at least one of the foregoing images.
 35. Theimage processor of claim 31, wherein said filter select look-up tableselects an image filter comprising a number of filter coefficients basedupon a direction and a magnitude of an edge detection value for an edgeor a homogenous area detected in at least one of a plurality of pixelsof an ultrasound image.
 36. The image processor of claim 31, whereinsaid filter select look-up table comprises one or more sets of imagefilters for one or more clinical applications, wherein each of saidimage filters comprise a set of filter coefficients.
 37. The imageprocessor of claim 31, wherein said image process filter comprises animage filter selected by said filter select look-up table.
 38. The imageprocessor of claim 31, wherein said filter select look-up table furthercomprises a means for updating a plurality of sets of image filtercoefficients stored in said filter select look-up table for eachclinical application.
 39. The image processor of claim 31, wherein saidfilter select look-up table further comprises a means for updating aplurality of image filters stored in said table for each clinicalapplication.
 40. The image processor of claim 31, further comprising anapparatus capable of generating a plurality of image filters and aplurality of sets of image filter coefficients.
 41. The image processorof claim 40, wherein said apparatus comprises one or more digital signalprocessors, devices having a central processing unit, and combinationscomprising at least one of the foregoing devices.
 42. The imageprocessor of claim 31, wherein said image process filter calculates aplurality of filtered image pixel intensity values to produce a filteredultrasound image.
 43. The image processor of claim 31, furthercomprising a memory storage device in communication with said filterselect look-up-table.
 44. The image processor of claim 43, wherein saidmemory storage device comprises a plurality of sets of image filters fora plurality of clinical applications, wherein each of said image filterscomprise a set of filter coefficients.
 45. The image processor of claim31, further comprising a means for generating a plurality of imagefilters and a plurality of sets of image filter coefficients incommunication with said filter select look-up-table.
 46. The imageprocessor of claim 45, wherein said means for generating a plurality ofimage filters and a plurality of sets of image filter coefficients is incommunication with a memory storage device.
 47. The image processor ofclaim 31, wherein said edge detection filter, said filter select look-uptable and said image process filter are selected from the groupconsisting of multipliers, adders, memory storage devices, digitalsignal processors and combinations comprising at least one of theforegoing devices
 48. An apparatus for detecting and enhancing edges anddetecting and smoothing homogeneous areas in an ultrasound image,comprising a set of instructions to detect and enhance one or more edgesand to detect and smooth one or more homogeneous areas in an ultrasoundimage.
 49. The apparatus of claim 48, wherein said set of instructionscomprises: an instruction to apply an edge detection filter to at leastone of a plurality of pixels of an ultrasound image to compute an edgedetection value comprising a magnitude and a direction; and aninstruction to apply either a directional edge enhancement filter or anon-directional smoothing filter to said at least one of said pluralityof pixels of said ultrasound image.
 50. The apparatus of claim 49,further comprising an instruction to extract at least one set of imagefilters comprising filter coefficients for one of a plurality ofapplications from memory devices of the apparatus; an instruction totransfer said extracted one set of image filters into a filter selectlook-up table of the apparatus; and an instruction to transfer a filtercomprising filter coefficients to an image process filter.
 51. Anarticle of manufacturing, comprising: a computer usable medium having aset of instruction means embodied therein for detecting and enhancingone or more edges and for detecting and smoothing one or morehomogeneous areas in an ultrasound image, said computer usable mediumcomprising: set of instruction means for causing said set ofinstructions to apply an edge detection filter across at least one of aplurality of pixels of an ultrasound image to compute an edge detectionvalue comprising a magnitude and a direction; and a set of instructionmeans for causing said set of instructions to apply either a directionaledge enhancement filter or a non-directional smoothing filter to said atleast one of said plurality of pixels of said ultrasound image.
 52. Asystem comprising: a computer usable medium having a set of instructionsfor detecting and enhancing one or more edges and for detecting andsmoothing one or more homogenous areas in an ultrasound image.
 53. Thesystem of claim 52, wherein said set of instructions comprises: aninstruction to apply an edge detection filter across at least one of aplurality of pixels of an ultrasound image to compute an edge detectionvalue comprising a magnitude and a direction; and an instruction toapply either a directional edge enhancement filter or a non-directionalsmoothing filter to said at least one of said plurality of pixels ofsaid ultrasound image.
 54. A program storage device readable by machine,tangibly embodying a program of instructions executable by said machineto perform method steps for detecting and enhancing one or more edgesand for detecting and smoothing one or more homogenous areas in anultrasound image, comprises: applying an edge detection filter across atleast one of a plurality of pixels of an ultrasound image to compute anedge detection value comprising a magnitude and a direction; andapplying either a directional edge enhancement filter or anon-directional smoothing filter to said at least one of said pluralityof pixels of said ultrasound image.